CREATE EXTERNAL TABLE jms_dm.dm_network_err_bagging_detail_dt(
  date_time date COMMENT '日期',
  region_code string COMMENT '大区编码',
  region_name string COMMENT '大区名称',
  proxyarea_code string COMMENT '代理区编码',
  proxyarea_name string COMMENT '代理区名称',
  franchisees_code string COMMENT '加盟商编码',
  franchisees_name string COMMENT '加盟商名称',
  site_code string COMMENT '网点编码',
  site_name string COMMENT '网点名称',
  package_code string COMMENT '包号',
  waybill_no string COMMENT '单号',
  need_first_code string COMMENT '应建包一段码',
  need_center_code string COMMENT '应建包末端机构code',
  need_center_name string COMMENT '应建包末端机构name',
  real_first_name string COMMENT '实建包一段码',
  real_center_code string COMMENT '实建包末端机构code',
  real_center_name string COMMENT '实建包末端机构name',
  bagging_user_code string COMMENT '建包扫描人员编码',
  bagging_user string COMMENT '建包扫描人员',
  bagging_scan_time timestamp COMMENT '建包扫描时间',
  order_source_code string COMMENT '订单来源code',
  order_source_name string COMMENT '订单来源name')
COMMENT '错建表票数明细'
 PARTITIONED BY (dt STRING COMMENT '时间分区 建包时间')
    STORED AS PARQUET
    LOCATION '/dw/hive/jms_dm.db/external/dm_network_err_bagging_detail_dt'
    TBLPROPERTIES (
        'discover.partitions' = 'false',
        'parquet.column.index.access' = 'true'
        );
